//
//  AddsViewController.m
//  UI_10_TableView
//
//  Created by dllo on 16/3/22.
//  Copyright © 2016年 XWH. All rights reserved.
//

#import "AddsViewController.h"

@interface AddsViewController ()
@property (nonatomic, retain)  UITextField *name;
@property (nonatomic, retain)   UITextField *phoneNumber;
@property (nonatomic, retain)   NSString *string;


@end

@implementation AddsViewController

-(void)dealloc{
    
    
    
    
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
   
    self.view.backgroundColor = [UIColor whiteColor];
    [self navi];
    [self addLinkmanDetil];
}

- (void)navi{
     self.navigationItem.title = @"添加";
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStyleDone target:self action:@selector(backAction:)];
}


- (void)backAction:(UIButton *)button{
    
    
    [self.text detil:self.phoneNumber.text :self.name.text];
   
    
    [self.navigationController popToRootViewControllerAnimated:YES];
    
    
}

- (void)addLinkmanDetil{
   self.name = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 150, 60)];
    self.name.placeholder = @"请输入姓名";
    [self.view addSubview:self.name];
    
  self.phoneNumber  = [[UITextField alloc] initWithFrame:CGRectMake(100, 170, 250, 60)];
    self.phoneNumber.placeholder = @"请输入电话号码";
    self.phoneNumber.keyboardType = UIKeyboardTypeNumberPad;
    
    [self.view addSubview:self.phoneNumber];
    
    
    
    [self.name release];
    [self.phoneNumber release];
    
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
